package com.ggs.rg.ybjb.usermodule;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
@MapperScan("com.ggs.rg.ybjb.usermodule.mapper")
public class UserModuleApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(UserModuleApplication.class, args);
    }

    /*
     *  配置外部tommcat
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        // 注意这里要指向原先用main方法执行的Application启动类
        return application.sources(UserModuleApplication.class);
    }

}
